package com.yigo.bsc.infra.repo.converter;

import com.yigo.bsc.api.dict.resp.DictItemListResp;
import com.yigo.bsc.infra.repo.dataobject.BscDictItemPO;
import com.yigo.bsc.infra.repo.dataobject.BscDictTypePO;
import com.yigo.cuc.domain.dict.entity.DictItem;
import com.yigo.cuc.domain.dict.entity.DictType;
import com.yigo.framework.snapshot.SnapshotConverter;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.*;

/**
 * @author chenzl
 */
@Mapper
public interface DictDmo2PoConverter extends SnapshotConverter {
    DictDmo2PoConverter INSTANCE = Mappers.getMapper(DictDmo2PoConverter.class);

    BscDictTypePO toPO(DictType source);

    DictType toDmo(BscDictTypePO source);

    BscDictItemPO toPO(DictItem source);

    DictItem toDmo(BscDictItemPO source);

    List<DictItemListResp> toItemListResp(List<BscDictItemPO> poList);
}
